/*!
 * @author Isis (igraziatto) Graziatto <isis.g@vanillaforums.com>
 * @copyright 2009-2018 Vanilla Forums Inc.
 * @license GPL-2.0-only
 */

/* -------------------------------------------------------------- *\
    Styles
\* -------------------------------------------------------------- */

html {
    -ms-overflow-style: -ms-autohiding-scrollbar;
}

body {
    box-sizing: border-box;
}

* {
    box-sizing: inherit;
}

.PhotoWrap {
    @include photoWrap;
}

.About.P,
.UserBox,
.MeBox {
    margin: 0;
}

.PhotoGrid {
    .ProfilePhoto {
        border-radius: 0;
        box-shadow: none;
    }

    img {
        vertical-align: initial;
    }
}

.DataList .Item {
    border-bottom-width: 0;
}

@if ($staticVariables) {
    .Item .Author a {
        font-size: inherit;
        font-weight: inherit;
        color: $component-meta_color;

        &:focus,
        &:hover {
            text-decoration: $theme-link-hover_textDecoration;
            color: $component-meta-link-hover_color;
        }
    }
}

.Item {
    .BlockTitle {
        font-size: inherit;
    }
}

.Message {
    margin-top: 0;
}

.DataTable td {
    border-bottom: 0;
}

.CategoryTable,
.DiscussionTable {
    margin-bottom: $utility-baseUnitTriple;
}

.CategoryTable,
.DataTableWrap {
    border-collapse: separate;

    tr {
        padding: 0;
    }

    tr.Read {
        background: none;
    }

    td {
        padding: 0;
        vertical-align: middle;
    }

    td .Wrap {
        position: relative;
    }

    thead {
        tr {
            border-bottom: none;
        }

        td {
            border-bottom: none;
        }

        td.BigCount .Wrap {
            display: flex;
            align-items: center;
            justify-content: center;
        }
    }

    .CheckBoxColumn {
        width: 20px;
    }

    tbody {
        .Wrap {
            padding: 0;
            position: relative;
        }
    }

    td.BigCount {
        vertical-align: middle;
        text-align: center;
    }

    .ChildCategories {
        padding-top: 0;
        border-top: none;
    }
}

.Options .Arrow {
    &::before {
        color: $global-color_fg;
    }
}

// The warnings plugin overrides the display property on this. Set it back.
.PhotoWrap.Hidden {
    display: none;
}

.ButtonGroup.Multi {
    display: flex;
    max-width: 100%;
}

.Options {
    height: initial;

    > span,
    > a {
        margin-left: $utility-baseUnit;
    }
}

.BlockTitle {
    padding: 0;
}

.AdminCheck {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: $icon-default_size;

    input {
        margin: 0;
        width: auto;
    }
}

.PageTitle .Options {
    height: auto;
}

.ItemDiscussion {
    margin-bottom: initial;
}

#SignoutWarning {
    bottom: initial;
    background: $global-color_white;

    * {
        line-height: 40px;
    }
}

.CreateAccount {
    margin-top: $utility-baseUnitDouble;
}

.idea-counter-box,
.DateTile {
    width: 40px;
    min-height: 40px;
    border-radius: $component_borderRadius;
}

.DateTile {
    color: $global-color_fg;
    padding: 6px 0 2px;
    text-align: center;
    background-color: $theme-hover_color;

    .Day {
        font-weight: $global-bold_fontWeight;
    }
}

a.ChangePicture {
    top: 0;
}

.UserSignature {
    font-size: $global-small_fontSize;
}

.Reactions {
    .ReactButton,
    .ReactButton.HasCount {
        vertical-align: baseline;
        display: inline-flex;
        align-items: center;
    }
}

.MenuItems-Reactions {
    .PhotoWrapSmall {
        margin-right: 0;
    }

    a {
        font-size: $global-small_fontSize;
        @include ellipsis;
    }
}

.MenuItems a:hover .Gloss {
    color: inherit !important;
}

#Form_Ban {
    @include Button(
        $button-primary_bg,
        $button-primary_fg,
        $button-primary_border,
        $button-primary-hover_bg,
        $button-primary-hover_fg,
        $button-primary-hover_border
    );
}

.Dropdown.MenuItems {
    @include maxWidth {
        min-width: auto;
    }
}

@if ($staticVariables) {
    [class*="Status-Tag-"] {
        padding: 0 !important;
        background-color: transparent !important;
    }
}

.Leaderboard-User {
    display: inline-block;
    overflow: auto;
    white-space: inherit;
    text-overflow: initial;
}

body > svg {
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    width: 1px !important;
}

table.PreferenceGroup th {
    min-width: 9ex;
}

.Popup #UserBadgeForm {
    p,
    h1 {
        margin-bottom: $utility-baseUnitDouble;
        display: block;
    }

    textarea {
        display: block;
        width: 100%;
        margin-top: $utility-baseUnitHalf;
    }

    button {
        @include Button($button-primary_bg, $button-primary_fg, $button-primary_border);
        float: right;
        margin-top: -16px;
    }
}

// Fix social connect page
.DataList-Connections {
    width: 100%;

    @include maxWidth(600px) {
        .Connection-Name {
            display: none;
        }
    }
}

.BlockTitle,
.Pager {
    font-weight: inherit;
}

#Panel .FilterMenu .Active,
.PanelInfo .Active {
    background: transparent;
    font-weight: inherit;
}

.PanelInfo li {
    border-bottom-width: 0;
}

.Box {
    margin: $utility-baseUnitDouble 0;
}

#Panel .FilterMenu li:first-child,
.PanelInfo li:first-child {
    border-top-width: 0;
}

.SocialIcon .Text {
    padding: 0 0 0 $utility-baseUnitHalf;
    font-weight: $formButton_fontWeight;
    font-size: $formButton_fontSize;
    line-height: $formButton_height;
    min-height: $formButton_height;
    min-width: 170px;
}

.PageDescription {
    margin: 0;
}

// Fix connection page of profile
.DataList-Connections {
    .Connection-Header {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
    }

    .Connection-Header {
        @include maxWidth {
            justify-content: center;
        }
    }

    .Connection-Name {
        margin: $utility-baseUnitDouble 0;
    }

    .Connection-Connect {
        margin-left: auto;
        position: static;
        padding: 0;
    }

    .Gloss.Connected {
        position: static;
        display: flex;
        align-items: center;
        width: 100%;

        .ProfilePhoto {
            height: 30px;
            width: 30px;
            margin-right: $utility-baseUnitDouble;
        }
    }
}

// Fix buttons on social page
.DataList-Connections {
    .Connection-Name {
        margin: 0;
        font-size: $global-medium_fontSize;
    }

    .Connection-Connect {
        @include maxWidth($theme-breakpoint_base) {
            margin: 10px 0 0 auto;
        }

        @include maxWidth {
            margin: 10px 0 0;
            width: 100%;
            display: flex;
            justify-content: center;
        }
    }
}

/*=====  End of Core Patches  ======*/
